package com.abel.quiz.vo;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import java.util.ArrayList;
import java.util.List;

import com.abel.quiz.po.MemberPo;

/**
* @author abel.lin
* @date_time 2017-08-08 20:18
* @description
*/
public class MemberDomain extends MemberPo {

    public static MemberDomain genDomain(MemberPo model){
        if(model == null){
            model = new MemberPo();
        }
        MemberDomain domain = JSON.parseObject(JSON.toJSONString(model), MemberDomain.class);
        return domain;
    }

    public static List<MemberDomain> genDomainList(List<MemberPo> modelList){
        if(modelList == null){
            modelList = new ArrayList<MemberPo>();
        }
        List<MemberDomain> domainList = JSONArray.parseArray(JSONArray.toJSONString(modelList), MemberDomain.class);
        return domainList;
    }

}
